#include <bits/stdc++.h>
using namespace std;

string addstring(string s, string t) {
    string res;
    int i = s.size() - 1, j = t.size() - 1, remain = 0;
    while(i >= 0 || j >= 0 || remain) {
        if(i >= 0) remain += s[i--] - '0';
        if(j >= 0) remain += t[j--] - '0';
        res += remain % 10 + '0';
        remain /= 10;
    }
    reverse(res.begin(), res.end());
    return res;
}

string multiply(string m, string n) {
    string res;
    for(int i = 0; i < m.size(); i++) {
        string cur;
        int remain = 0;
        for(int j = 0; j < n.size(); j++) {
            remain += (m[i] - '0') * (n[j] - '0');
            cur += to_string(remain % 10);
            remain /= 10;
        }
        reverse(cur.begin(), cur.end());
        while(i--) {
            cur += '0';
        }
        res = addstring(res, cur);
    }
    return res;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    string m, n;
    cin >> m >> n;
    reverse(m.begin(), m.end());
    reverse(n.begin(), n.end());
    cout << multiply(m, n) << endl;
    return 0;
}